home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 50
/
Volume 50 - JOGO DISK .iso
/
Games
/
mechacatdestructo.swf
/
scripts
/
frame_7
/
PlaceObject2_318_1169
/
CLIPACTIONRECORD onClipEvent(load).as
Wrap
Text File
|
2007-10-01
|
5KB
|
184 lines
onClipEvent(load){
function ToMute()
{
_global.Muted = true;
this.onEnterFrame = function()
{
if(SetVolumePack > 0)
{
SetVolumePack -= 5;
packMusic.setVolume(SetVolumePack);
}
if(SetVolumeInG > 0)
{
SetVolumeInG -= 5;
gameMusic.setVolume(SetVolumeInG);
}
if(SetVolumePack == 0 && SetVolumeInG == 0)
{
delete onEnterFrame;
}
};
}
function UnMute()
{
_global.Muted = false;
this.onEnterFrame = function()
{
if(SetVolumePack < 80 && musicIn == "Packaging")
{
SetVolumePack += 5;
packMusic.setVolume(SetVolumePack);
}
if(SetVolumeInG < 80 && musicIn == "InGame")
{
SetVolumeInG += 5;
gameMusic.setVolume(SetVolumeInG);
}
if(SetVolumePack == 80 || SetVolumeInG == 80)
{
delete onEnterFrame;
}
};
}
function SwitchToPack()
{
musicIn = "Packaging";
this.onEnterFrame = function()
{
if(_global.Muted)
{
delete onEnterFrame;
}
else
{
if(SetVolumePack < 80)
{
SetVolumePack += 5;
packMusic.setVolume(SetVolumePack);
}
if(SetVolumeInG > 0)
{
SetVolumeInG -= 5;
gameMusic.setVolume(SetVolumeInG);
}
if(SetVolumePack == 80 && SetVolumeInG == 0)
{
delete onEnterFrame;
}
}
};
}
function SwitchToInGame()
{
musicIn = "InGame";
this.onEnterFrame = function()
{
if(_global.Muted)
{
delete onEnterFrame;
}
else
{
if(SetVolumeInG < 80)
{
SetVolumeInG += 5;
gameMusic.setVolume(SetVolumeInG);
}
if(SetVolumePack > 0)
{
SetVolumePack -= 5;
packMusic.setVolume(SetVolumePack);
}
if(SetVolumeInG == 80 && SetVolumePack == 0)
{
delete onEnterFrame;
}
}
};
}
function PlayASound(WitchSound, nloop, nVolume)
{
trace("WitchSound = " + WitchSound);
if(nloop == undefined)
{
nloop = 1;
}
if(nVolume == undefined)
{
nVolume = 100;
}
if(!_global.Muted)
{
eval(WitchSound).start(0,nloop);
eval(WitchSound).setVolume(nVolume);
}
}
_global.Sounds = this;
_global.Muted = false;
var SetVolumeInG;
var SetVolumePack;
var musicIn;
this.createEmptyMovieClip("packMusic",1);
packMusic = new Sound("packMusic");
packMusic.attachSound("packMusic");
this.createEmptyMovieClip("gameMusic",2);
gameMusic = new Sound("gameMusic");
gameMusic.attachSound("gameMusic");
packMusic.start(0,1000000);
gameMusic.start(0,1000000);
SetVolumePack = 80;
SetVolumeInG = 0;
musicIn = "Packaging";
packMusic.setVolume(SetVolumePack);
gameMusic.setVolume(SetVolumeInG);
this.createEmptyMovieClip("Jump",3);
Jump = new Sound("Jump");
Jump.attachSound("Jump");
this.createEmptyMovieClip("Kick",4);
Kick = new Sound("Kick");
Kick.attachSound("Kick");
this.createEmptyMovieClip("Pot",5);
Pot = new Sound("Pot");
Pot.attachSound("Pot");
this.createEmptyMovieClip("Tirroir",7);
Tirroir = new Sound("Tirroir");
Tirroir.attachSound("Tirroir");
this.createEmptyMovieClip("Objet",10);
Objet = new Sound("Objet");
Objet.attachSound("Objet");
this.createEmptyMovieClip("Ball",12);
Ball = new Sound("Ball");
Ball.attachSound("Ball");
this.createEmptyMovieClip("Lazer",13);
Lazer = new Sound("Lazer");
Lazer.attachSound("Lazer");
this.createEmptyMovieClip("Crache",14);
Crache = new Sound("Crache");
Crache.attachSound("Crache");
this.createEmptyMovieClip("Explos",15);
Explos = new Sound("Explos");
Explos.attachSound("Explos");
this.createEmptyMovieClip("Bump",16);
Bump = new Sound("Bump");
Bump.attachSound("Bump");
this.createEmptyMovieClip("electroc",17);
electroc = new Sound("electroc");
electroc.attachSound("electroc");
this.createEmptyMovieClip("Coussin",18);
Coussin = new Sound("Coussin");
Coussin.attachSound("Coussin");
this.createEmptyMovieClip("rBump",19);
rBump = new Sound("rBump");
rBump.attachSound("rBump");
this.createEmptyMovieClip("rHead",20);
rHead = new Sound("rHead");
rHead.attachSound("rHead");
this.createEmptyMovieClip("Missile",22);
Missile = new Sound("Missile");
Missile.attachSound("Missile");
this.createEmptyMovieClip("Dead",23);
Dead = new Sound("Dead");
Dead.attachSound("Dead");
}